package com.ie.intelligence_education.controller;

import com.ie.intelligence_education.pojo.Teacher;
import com.ie.intelligence_education.service.TeacherService;
import com.ie.intelligence_education.utils.Result;
import jakarta.servlet.http.HttpServletRequest;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("teacher")
@Slf4j
@CrossOrigin
public class TeacherController {
    @Autowired
    private TeacherService teacherService;
    @PostMapping("login")
    public Result login(@RequestBody Teacher teacher, HttpServletRequest request){
        Result result = teacherService.login(teacher,request);
        return result;
    }
    @PostMapping("register")
    public Result register(@RequestBody Teacher teacher){
        return null;
    }
}
